<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>基本资料</title>
    <link rel="stylesheet" href="./css/app.css">
    <link rel="stylesheet" href="../font/ionicons-2.0.1/css/ionicons.min.css">
    <link rel="stylesheet" href="../tools/multisSelect/bootstrap-multiselect.css">
</head>
<body>
<div class="baseinfo-body person-account">
    <div class="to" style="">
        <!--加载公共的样式-->
        @@include('./include/top.html')
        <!--栅格系统第二行开始-->
        <div class="row top2">
            <div class="col-md-2 ul">
                <p>个人资料</p>
            </div>
            <div class="col-md-2 ul">
                <p class="active">修改密码</p>
            </div>
            <div class="col-md-2 ul">
                <p>认证信息</p>
            </div>
            <div class="col-md-2 col-md-offset-4 ul">
                <div class="you">
                    <span>预览个人主页</span>
                </div>
            </div>
        </div>
        <!--栅格系统第二行结束-->
        <div class="row top5"  style="height:  1000px;">
            <form class="form-horizontal" role="form" method="post" name="myform" style="padding: 30px 20px;">
                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">当前密码</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="firstname" placeholder="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">新密码</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="Js_new_password" placeholder="">
                    </div>
                    <div class="col-sm-5" style="line-height: 18px; color: #b0b0b0; font-size: 12px;">
                        密码由6-16(字母、数字、符号)组成，区分大小写(不能是6位纯数字，不能包含空格)
                        建议使用英文字母加数字或符号的混合密码
                    </div>
                </div>

                <div class="form-group">
                    <label for="firstname" class="col-sm-2 control-label">确认密码</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" id="firstname" placeholder="">
                    </div>
                </div>


                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-danger">保存</button>
                    </div>
                </div>

            </form>

        </div>






    </div>
</div>
</div>
</body>
<script src="./js/jquery/jquery.js"></script>
<script src="./js/bootstrap/bootstrap.js"></script>
<script src="../tools/Calendar.js"></script>
<script src="./js/app.js"></script>
<script>
    $('#Js_new_password').keyup(function () {
        var val = $(this).val();
        var lentght = checkStrong(val);


    });

    function checkStrong(sValue) {
        var modes = 0;
        //正则表达式验证符合要求的
        if (sValue.length < 1) return modes;
        if (/\d/.test(sValue)) modes++; //数字
        if (/[a-z]/.test(sValue)) modes++; //小写
        if (/[A-Z]/.test(sValue)) modes++; //大写
        if (/\W/.test(sValue)) modes++; //特殊字符

        //逻辑处理
        switch (modes) {
            case 1:
                return 1;
                break;
            case 2:
                return 2;
            case 3:
            case 4:
                return sValue.length < 12 ? 3 : 4
                break;
        }
    }

</script>
</html>